<%- include('header', { isLogin }) %>

<div class="body" >


    <ul class="tag">
        <li class="tag-item <%= category === 'all' ? 'tag-item_active' : '' %>">
            <a href="/article/?category=all">全部</a>
        </li>
        <% for (const categoryItem of categoryList) { %>
            <li class="tag-item <%= category === categoryItem._id ? 'tag-item_active' : '' %>">
                <a href="/article/?category=<%= categoryItem._id %>"><%= categoryItem._id %></a>
            </li>
        <% } %>
    </ul>

    <% for (const article of articleList) { %>
        <%- include('components/article-item', { isLogin, article}) %>
    <% } %>

</div>

<%- include('footer') %>
